package xiaohao.order.dao;

import com.taobao.api.domain.Trade;

import xiaohao.order.domain.MemoDO;
import xiaohao.order.domain.TradeQuery;
import xiaohao.order.domain.result.TradeQueryResult;
import xiaohao.order.exception.TradeException;

public interface TradeDao {

	TradeQueryResult getTradesBy(TradeQuery query, String sessionKey) throws TradeException;
	
	Trade getTradeByTid(long tid, String sessionKey) throws TradeException;
	
	Trade addMemo(long tid, MemoDO memoDO, String sessionKey) throws TradeException;
	
	Trade updateMemo(long tid, MemoDO memoDO, String sessionKey) throws TradeException;
	
	TradeQueryResult getTradesForSpending(TradeQuery query, String sessionKey) throws TradeException;
	
	TradeQueryResult getTradesForTradeCycle(TradeQuery query, String sessionKey) throws TradeException;
	
	TradeQueryResult getTradesForTradeAmount(TradeQuery query, String sessionKey) throws TradeException;
	
	Trade getTradeByTidForPromotion(long tid, String sessionKey) throws TradeException;
	
}
